﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Pages/Inicio.master" AutoEventWireup="false" CodeFile="CajaPagosRegistro.aspx.vb" Inherits="Pages_Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:Button ID="btnNuevoPago" runat="server" style="display:none" />
    <asp:ModalPopupExtender ID="popupPago" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID="btnNuevoPago" PopupControlID="panelPago">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelPago" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppNuevoPago" runat="server">
            <ContentTemplate>
                <div style="background-color:white;">
                        <div class="subtittle">Nuevo Pago</div>
                        <table>
                            <tr><td class="textright">Modalidad Pago</td>
                                <td class="textleft">
                                    <asp:DropDownList ID="ddlbModalidaPago" runat="server" CssClass="textleft" Width="170px"></asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td class="textright">Moneda</td>
                                <td class="textleft">
                                    <asp:DropDownList ID="ddlbMoneda" runat="server" CssClass="textleft" Width="170px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="textright">Monto</td>
                                <td class="textleft">
                                    <asp:TextBox ID="txbMonto" runat="server" CssClass="textright" Width="70px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="textright">Comprobante</td>
                                <td class="textleft">
                                    <asp:DropDownList ID="ddlbComprobante" runat="server" CssClass="textleft" Width="170px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="textright">Número</td>
                                <td class="textleft">
                                    <asp:TextBox ID="txbComprobante" runat="server" CssClass="textleft" Width="100px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr><td class="textright">Observaciones</td>
                                <td class="textleft">
                                    <asp:TextBox ID="txbobservaciones" runat="server" CssClass="textleft"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td class="textcenter" colspan="2">&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="textcenter" colspan="2">
                                    <asp:ImageButton ID="imgGrabar" runat="server" ImageUrl="~/Images/texto/btnGrabar.png" />
                                    &nbsp;<asp:ImageButton ID="imgRetornar" runat="server" ImageUrl="~/Images/texto/btnCancelar.png" />
                                </td>
                            </tr>    
                        </table>
                    </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:UpdatePanel ID="uppPago" runat="server">
        <ContentTemplate>
            <div class="estandardiv" >
                <br />
                <div class="subtittle">Registro de Pagos</div>
                <br />
                <center>
                <table style="width:700px">
                    <tr>
                        <td class="textright" style="width:90px">Orden</td>
                        <td class="textleft">
                            <asp:TextBox ID="txbOrden" runat="server" CssClass="textleft"></asp:TextBox>
                            <asp:ImageButton ID="ibtnBuscar" runat="server" ImageUrl="~/Images/img/buscar.png" style="width: 16px" />
                        </td>
                    </tr>
                </table>
                </center>
                <br />
                <asp:Panel ID="pnDatos" runat="server" Visible="false">
                    <center>
                    <table style="width:700px">
                        <tr><td class="textright">Cliente</td>
                            <td class="textleft"><asp:TextBox ID="txbCliente" runat="server" CssClass="textleft" Width="350px" BorderStyle="None"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Número Documento</td>
                            <td class="textleft">
                                <asp:TextBox ID="txbDocumento" runat="server" BorderStyle="None" CssClass="textleft" ReadOnly="True" Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="textright">Dirección</td>
                            <td class="textleft">
                                <asp:TextBox ID="txbDireccion" runat="server" BorderStyle="None" Width="502px" CssClass="textleft"></asp:TextBox>
                                <asp:ImageButton ID="imgAgregarPago" runat="server" ImageUrl="~/Images/texto/btnPagos.png" />
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table style="width:700px">
                        <tr><td class="subtittle2">Cobros</td></tr>
                        <tr><td>
                            <asp:GridView ID="gridCobros" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Width="700px">
                                <Columns>
                                    <asp:BoundField DataField="CodCobro" HeaderText="Código" SortExpression="CodCobro">
                                    <ItemStyle Width="40px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FecCobro" HeaderText="Fecha" SortExpression="FecCobro">
                                    <ItemStyle Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Cant" HeaderText="Cant." SortExpression="Cant">
                                    <ItemStyle Width="50px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Pedido" HeaderText="Pedido" SortExpression="Pedido">
                                    <ItemStyle CssClass="textleft" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Monto" HeaderText="Monto" SortExpression="Monto">
                                    <ItemStyle CssClass="textright" Width="80px" />
                                    </asp:BoundField>
                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <RowStyle ForeColor="#000066" />
                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                <SortedDescendingHeaderStyle BackColor="#00547E" />
                            </asp:GridView>
                            </td></tr>
                        <tr><td class="textright">Total Deuda:
                            <asp:Label ID="LblTotalCobro" runat="server" Text="0.00"></asp:Label>
                            </td></tr>
                    </table>
                    <br />
                    <table style="width:700px">
                        <tr><td class="subtittle2">Pagos</td></tr>
                        <tr><td>
                            <asp:GridView ID="gridPagos" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Width="700px">
                                <Columns>
                                    <asp:BoundField DataField="CodPago" HeaderText="Código" SortExpression="CodPago">
                                    <ItemStyle Width="40px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FecPago" HeaderText="Fecha" SortExpression="FecPago">
                                    <ItemStyle CssClass="textcenter" Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ModalidadPago" HeaderText="Tipo Pago" SortExpression="ModalidadPago">
                                    <ItemStyle CssClass="textleft" Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Comprobante" HeaderText="Tipo Comprobante" SortExpression="Comprobante">
                                    <ItemStyle CssClass="textleft" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="NroComprobante" HeaderText="N° Comprobante" SortExpression="NroComprobante">
                                    <ItemStyle CssClass="textleft" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Monto" HeaderText="Monto" SortExpression="Monto">
                                    <ItemStyle CssClass="textright" Width="90px" />
                                    </asp:BoundField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ibtnAnularPago" CommandName="cnAnular" runat="server" ImageUrl="~/Images/img/anulaRegistro.png" />
                                        </ItemTemplate>
                                        <ItemStyle Width="20px" />
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <RowStyle ForeColor="#000066" />
                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                <SortedDescendingHeaderStyle BackColor="#00547E" />
                            </asp:GridView>
                            </td></tr>
                        <tr><td class="textright">Total Pagos: 
                            <asp:Label ID="LblTotalPago" runat="server" Text="0.00"></asp:Label></td></tr>
                    </table>
                    <br />
                    <div class="textleft" style="width:700px">Deuda Pendiente:<asp:Label ID="LblDeuda" runat="server" Text="0.00"></asp:Label></div>
                    </center>
                </asp:Panel>

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>

